<template>
	<zero-custom-bar :effect="false" color="#000000" title='支付' backgroundColor="#F7F4F0"
		:singleIcon="true"></zero-custom-bar>
	<image src="../../static/success.png" class="success" mode=""></image>
	<text class="title">支付成功</text>
	<view class="bottom">
		<button class="order-btn" @click="bindOrderInfo">查看订单</button>
		<button class="home-btn" @click="bindHome">返回首页</button>
	</view>
</template>

<script setup>
	import {
		onLoad,
	} from '@dcloudio/uni-app'
	import {
		ref
	} from 'vue';
	const orderId = ref()
	const businessType = ref()
	onLoad((params) => {
		orderId.value = params.orderId
		businessType.value = params.businessType
	})
	const bindHome = () => {
		uni.switchTab({
			url: '/pages/index/index'
		})
	}
	const bindOrderInfo = () => {
		if(businessType.value==6){
			uni.reLaunch({
				url:'/pages/proxyInfo/proxyInfo?id='+ orderId.value
			})
		}else if(businessType.value==5){
			uni.reLaunch({
				url: '/pages/orderInfoT/orderInfoT?id=' + orderId.value
			})
		}else{
			uni.reLaunch({
				url: '/pages/orderInfo/orderInfo?id=' + orderId.value
			})
		}
		
	}
</script>

<style lang="scss">
	page {
		background: #F7F4F0;
	}

	.success {
		display: block;
		width: 92rpx;
		height: 92rpx;
		margin: 100rpx auto 30rpx;
	}

	.title {
		font-weight: bold;
		font-size: 34rpx;
		color: #000000;
		display: block;
		text-align: center;
	}

	.bottom {
		margin: 128rpx 55rpx 0;
		display: flex;
		justify-content: space-between;

		.order-btn {
			width: 311rpx;
			height: 101rpx;
			background: rgba(254, 156, 36, 0.15);
			border-radius: 28rpx;
			border: 1px solid #FE9C24;
			font-weight: bold;
			font-size: 34rpx;
			color: #FE9C24;
			line-height: 100rpx;
		}

		.home-btn {
			width: 310rpx;
			height: 100rpx;
			background: linear-gradient(90deg, #FFC53D 0%, #FE9B23 51%, #FFC53D 100%);
			box-shadow: 4rpx 12rpx 18rpx 0rpx rgba(254, 155, 35, 0.25);
			border-radius: 28rpx;
			font-weight: bold;
			font-size: 34rpx;
			color: #FFFFFF;
			line-height: 100rpx;
		}
	}
</style>